using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

[System.Serializable]
public class EventPlayerMove : UnityEvent<Vector3> { }

public class MouseManager : MonoBehaviour
{
    public static MouseManager Instance;

    public EventPlayerMove OnMouse_1_Click;

    RaycastHit hitInfo;


    private void Awake()
    {
        Instance = this; 
        
    }
    private void Update()
    {
        MouseControl();
    }

    void SetCursorTexture()
    {

    }

    void MouseControl()
    {
        if (Input.GetMouseButton(1)&&hitInfo.collider!=null)
        {
            if (hitInfo.collider.gameObject.tag=="Ground")
            {
                OnMouse_1_Click?.Invoke(hitInfo.point); 
            }

        }

    }


}
